#include "Metal.hpp"

bool Metal::scatter(
    const Ray& rayIn, const ShadePayload& payload,
    Ray& rayOut, Eigen::Vector3f& attenuation
)const {
    rayOut.origin() = payload.pos;
    rayOut.direction() = reflect(rayIn.direction(), payload.normal) + fuzz * rand_vec_in_sphere();
    attenuation = albedo;
    return true;
}